###############################################
# === xenomorph_captor_tech.txt ===
###############################################
###############################################
# XENOMORPH CAPTOR TECH (non-hive empires)
#
# Research that lets non-hive empires exploit captured Xenomorphs.
# Entry tech (Containment) appears when the empire has a wild-Xeno blocker
# OR an enslaved Xenomorph pop. The rest chain from it.
###############################################

# --- ENTRY: Xeno Containment (unlocks the Zoo) ---
tech_xeno_containment = {
	icon = tech_neural_implants
	cost = @tier1cost2
	area = society
	tier = 1
	category = { biology }
	weight = @tier1weight2

	potential = {
		is_gestalt = no
	}

	# Appears once the empire has wild Xenos to pacify or a Xeno slave.
	weight_modifier = {
		factor = 0
		modifier = {
			factor = 1
			OR = {
				any_owned_planet = { has_deposit = d_feral_xenomorphs }
				any_owned_planet = { has_deposit = d_pacified_xenomorphs }
				any_owned_pop_group = { is_xenomorph = yes }
			}
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xeno_containment_building_title"
			desc = "tech_xeno_containment_building_desc"
		}
	}

	ai_weight = { factor = 2 }
}

# --- Xeno Exploitation (unlocks Pleasure Den) ---
tech_xeno_exploitation = {
	icon = tech_neural_implants
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	weight = @tier2weight2

	potential = { is_gestalt = no }
	prerequisites = { tech_xeno_containment }

	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_pop_group = { is_xenomorph = yes }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xeno_exploitation_building_title"
			desc = "tech_xeno_exploitation_building_desc"
		}
	}

	ai_weight = { factor = 2 }
}

# --- Xeno Vivisection (unlocks Vivisection Lab + Xeno soldier armies) ---
tech_xeno_vivisection = {
	icon = tech_neural_implants
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	weight = @tier2weight1

	potential = { is_gestalt = no }
	prerequisites = { tech_xeno_containment }

	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_pop_group = { is_xenomorph = yes }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xeno_vivisection_building_title"
			desc = "tech_xeno_vivisection_building_desc"
		}
		army = {
			title = "tech_xeno_vivisection_army_title"
			desc = "tech_xeno_vivisection_army_desc"
		}
	}

	ai_weight = { factor = 2 }
}

# --- Xeno Husbandry (unlocks Egg Hatchery + Breeding Vats) ---
tech_xeno_husbandry = {
	icon = tech_neural_implants
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	weight = @tier2weight2

	potential = { is_gestalt = no }
	prerequisites = { tech_xeno_containment }

	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_pop_group = { is_xenomorph = yes }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xeno_husbandry_building_title"
			desc = "tech_xeno_husbandry_building_desc"
		}
	}

	ai_weight = { factor = 2 }
}

# --- Xeno Warrior Conscription (unlocks the top Xeno soldier army) ---
tech_xeno_warrior_conscription = {
	icon = tech_gene_tailoring
	cost = @tier3cost1
	area = society
	tier = 3
	category = { biology }
	weight = @tier3weight1

	potential = { is_gestalt = no }
	prerequisites = { tech_xeno_vivisection }

	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_pop_group = { is_xenomorph = yes }
		}
	}

	prereqfor_desc = {
		army = {
			title = "tech_xeno_warrior_conscription_army_title"
			desc = "tech_xeno_warrior_conscription_army_desc"
		}
	}

	ai_weight = { factor = 2 }
}

###############################################
# === xenomorph_royal_colony_technologies.txt ===
###############################################
###############################################
# XENOMORPH ROYAL COLONY TECHNOLOGIES
#
# Capital-chain techs (tech_xenomorph_matriarch_hive,
# tech_xenomorph_broodmother_hive, tech_xenomorph_empress_hive,
# tech_xenomorph_war_matriarch_hive) are defined in
# xenomorph_technologies.txt with the corrected prerequisite chain:
#
#   Matriarch Hive (T3) -> Empress Hive (T4)
#                       -> Brood Queen Hive [tech_xenomorph_broodmother_hive] (T4)
#                       -> War Matriarch Hive (T4)
#
# This file is intentionally empty after the capital chain refactor.
###############################################

###############################################
# === xenomorph_technologies.txt ===
###############################################
###############################################
# XENOMORPH BIOLOGY RESEARCH TREE
# 8 society technologies gated on subspecies traits.
# Each unlocks a specific variant army type.
# One engineering tech unlocks the Praetorian Guard army.
###############################################

# RUNNER — Mammalian host adaptation
tech_xeno_runner_adaptation = {
	icon = tech_genome_mapping
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	ai_update_type = all
	weight = 50

	potential = {
		any_owned_species = {
			has_trait = trait_xeno_mammalian_host
		}
	}

	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { has_trait = trait_xeno_mammalian_host }
		}
	}

	prereqfor_desc = {
		army = {
			title = "tech_xeno_runner_adaptation_army_title"
			desc = "tech_xeno_runner_adaptation_army_desc"
		}
	}
}

# LURKER — Arboreal host instincts
tech_xeno_lurker_instincts = {
	icon = tech_genome_mapping
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	ai_update_type = all
	weight = 50

	potential = {
		any_owned_species = {
			has_trait = trait_xeno_arboreal_host
		}
	}

	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { has_trait = trait_xeno_arboreal_host }
		}
	}

	prereqfor_desc = {
		army = {
			title = "tech_xeno_lurker_instincts_army_title"
			desc = "tech_xeno_lurker_instincts_army_desc"
		}
	}
}

# SPITTER — Acid gland hyperdevelopment
tech_xeno_acid_hyperdevelopment = {
	icon = tech_gene_tailoring
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	ai_update_type = all
	weight = 50

	potential = {
		any_owned_species = {
			has_trait = trait_xeno_acid_gland
		}
	}

	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { has_trait = trait_xeno_acid_gland }
		}
	}

	prereqfor_desc = {
		army = {
			title = "tech_xeno_acid_hyperdevelopment_army_title"
			desc = "tech_xeno_acid_hyperdevelopment_army_desc"
		}
	}
}

# CRUSHER — Exoskeletal reinforcement
tech_xeno_exoskeletal_reinforcement = {
	icon = tech_genome_mapping
	cost = @tier3cost1
	area = society
	tier = 3
	category = { biology }
	ai_update_type = all
	weight = 40

	potential = {
		any_owned_species = {
			has_trait = trait_xeno_carapace_heavy
		}
	}

	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { has_trait = trait_xeno_carapace_heavy }
		}
	}

	prereqfor_desc = {
		army = {
			title = "tech_xeno_exoskeletal_reinforcement_army_title"
			desc = "tech_xeno_exoskeletal_reinforcement_army_desc"
		}
	}
}

# CHARGER — Adrenal surge mutation
tech_xeno_adrenal_surge = {
	icon = tech_genome_mapping
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	ai_update_type = all
	weight = 50

	potential = {
		any_owned_species = {
			has_trait = trait_xeno_adrenal
		}
	}

	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { has_trait = trait_xeno_adrenal }
		}
	}

	prereqfor_desc = {
		army = {
			title = "tech_xeno_adrenal_surge_army_title"
			desc = "tech_xeno_adrenal_surge_army_desc"
		}
	}
}

# AQUATIC STALKER — Aquatic adaptation
tech_xeno_aquatic_adaptation = {
	icon = tech_genome_mapping
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	ai_update_type = all
	weight = 50

	potential = {
		any_owned_species = {
			has_trait = trait_xeno_aquatic_host
		}
	}

	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { has_trait = trait_xeno_aquatic_host }
		}
	}

	prereqfor_desc = {
		army = {
			title = "tech_xeno_aquatic_adaptation_army_title"
			desc = "tech_xeno_aquatic_adaptation_army_desc"
		}
	}
}

# NEOMORPH — Spore propagation
tech_xeno_spore_propagation = {
	icon = tech_genome_mapping
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	ai_update_type = all
	weight = 50

	potential = {
		any_owned_species = {
			has_trait = trait_xeno_spore_host
		}
	}

	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { has_trait = trait_xeno_spore_host }
		}
	}

	prereqfor_desc = {
		army = {
			title = "tech_xeno_spore_propagation_army_title"
			desc = "tech_xeno_spore_propagation_army_desc"
		}
	}
}

# ROYAL CASTE DEVELOPMENT — Unlocks Praetorian Guard army recruitment
# Requires Empress Chamber to be built
tech_xeno_royal_caste_development = {
	icon = tech_genome_mapping
	cost = @tier3cost1
	area = society
	tier = 3
	category = { biology }
	ai_update_type = all
	weight = 30

	potential = {
		any_owned_planet = {
			has_building = building_xenomorph_empress_hive
		}
	}

	weight_modifier = {
		modifier = {
			factor = 3
			any_owned_planet = { has_building = building_xenomorph_empress_hive }
		}
	}

	prereqfor_desc = {
		army = {
			title = "tech_xeno_royal_caste_army_title"
			desc = "tech_xeno_royal_caste_army_desc"
		}
	}
}
# Xenomorph Hostline Evolution - technology unlocks
# Put this file in: common/technology/
# These are starter techs. Add prerequisites/category tuning to match your larger tech tree.

tech_xenomorph_genetic_hostline_extraction = {
	icon = tech_gene_tailoring
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = @tier2weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = { modifier = { factor = 2 has_valid_civic = civic_hive_devouring_swarm } }
}

# Normal hostline adaptation tech. The study already sets the unlocked flag; this tech can be used to unlock traits, armies, buildings, or decisions.
tech_xenomorph_reptilian_hostline_adaptation = {
	icon = tech_gene_tailoring
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = 0
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = { modifier = { factor = 100 has_country_flag = xeno_reptilian_hostline_tech_available } }
}

# Normal hostline adaptation tech. The study already sets the unlocked flag; this tech can be used to unlock traits, armies, buildings, or decisions.
tech_xenomorph_avian_hostline_adaptation = {
	icon = tech_gene_tailoring
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = 0
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = { modifier = { factor = 100 has_country_flag = xeno_avian_hostline_tech_available } }
}

# Normal hostline adaptation tech. The study already sets the unlocked flag; this tech can be used to unlock traits, armies, buildings, or decisions.
tech_xenomorph_mammalian_hostline_adaptation = {
	icon = tech_gene_tailoring
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = 0
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = { modifier = { factor = 100 has_country_flag = xeno_mammalian_hostline_tech_available } }
}

# Normal hostline adaptation tech. The study already sets the unlocked flag; this tech can be used to unlock traits, armies, buildings, or decisions.
tech_xenomorph_arthropoid_hostline_adaptation = {
	icon = tech_gene_tailoring
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = 0
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = { modifier = { factor = 100 has_country_flag = xeno_arthropoid_hostline_tech_available } }
}

# Normal hostline adaptation tech. The study already sets the unlocked flag; this tech can be used to unlock traits, armies, buildings, or decisions.
tech_xenomorph_molluscoid_hostline_adaptation = {
	icon = tech_gene_tailoring
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = 0
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = { modifier = { factor = 100 has_country_flag = xeno_molluscoid_hostline_tech_available } }
}

# Normal hostline adaptation tech. The study already sets the unlocked flag; this tech can be used to unlock traits, armies, buildings, or decisions.
tech_xenomorph_lithoid_hostline_adaptation = {
	icon = tech_gene_tailoring
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = 0
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = { modifier = { factor = 100 has_country_flag = xeno_lithoid_hostline_tech_available } }
}

# Normal hostline adaptation tech. The study already sets the unlocked flag; this tech can be used to unlock traits, armies, buildings, or decisions.
tech_xenomorph_aquatic_hostline_adaptation = {
	icon = tech_gene_tailoring
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = 0
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = { modifier = { factor = 100 has_country_flag = xeno_aquatic_hostline_tech_available } }
}

# Normal hostline adaptation tech. The study already sets the unlocked flag; this tech can be used to unlock traits, armies, buildings, or decisions.
tech_xenomorph_necroid_hostline_adaptation = {
	icon = tech_gene_tailoring
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = 0
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = { modifier = { factor = 100 has_country_flag = xeno_necroid_hostline_tech_available } }
}

# Psionic/Cybernetic hostlines do NOT unlock immediately from the study. The study unlocks this research option; the monthly event sets the subspecies flag after this tech is researched.
tech_xenomorph_psionic_hostline_adaptation = {
	icon = tech_gene_tailoring
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = 0
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = { modifier = { factor = 100 has_country_flag = xeno_psionic_hostline_tech_available } }
}

# Psionic/Cybernetic hostlines do NOT unlock immediately from the study. The study unlocks this research option; the monthly event sets the subspecies flag after this tech is researched.
tech_xenomorph_cybernetic_hostline_adaptation = {
	icon = tech_gene_tailoring
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = 0
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = { modifier = { factor = 100 has_country_flag = xeno_cybernetic_hostline_tech_available } }
}

###############################################
# XENOMORPH BUILDING / RESEARCH / SLAVE TECHNOLOGIES
###############################################

tech_xenomorph_neural_echo_studies = {
	icon = tech_genome_mapping
	cost = @tier1cost2
	area = physics
	tier = 1
	category = { field_manipulation particles }
	weight = @tier1weight2

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_neural_echo_studies_building_title"
			desc = "tech_xenomorph_neural_echo_studies_building_desc"
		}
	}
}

tech_xenomorph_genetic_memory_archives = {
	icon = tech_gene_tailoring
	cost = @tier1cost2
	area = society
	tier = 1
	category = { biology }
	weight = @tier1weight2

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_genetic_memory_archives_building_title"
			desc = "tech_xenomorph_genetic_memory_archives_building_desc"
		}
	}
}

tech_xenomorph_chitin_architecture = {
	icon = tech_genome_mapping
	cost = @tier1cost2
	area = engineering
	tier = 1
	category = { industry materials }
	weight = @tier1weight2

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_chitin_architecture_building_title"
			desc = "tech_xenomorph_chitin_architecture_building_desc"
		}
	}
}

tech_xenomorph_perfected_specimen_nexus = {
	icon = tech_genome_mapping
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = @tier2weight2
	prerequisites = {
		"tech_xenomorph_neural_echo_studies"
		"tech_xenomorph_genetic_memory_archives"
		"tech_xenomorph_chitin_architecture"
	}

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 1.5
			has_technology = tech_xenomorph_neural_echo_studies
		}
		modifier = {
			factor = 1.5
			has_technology = tech_xenomorph_genetic_memory_archives
		}
		modifier = {
			factor = 1.5
			has_technology = tech_xenomorph_chitin_architecture
		}
	}
}

tech_xenomorph_bioelectric_resonance = {
	icon = tech_genome_mapping
	cost = @tier2cost1
	area = physics
	tier = 2
	category = { field_manipulation particles }
	weight = @tier2weight1
	prerequisites = { "tech_xenomorph_neural_echo_studies" }

	potential = { xeno_is_xenomorph_hive_country = yes }
}

tech_xenomorph_hostline_gene_archive = {
	icon = tech_gene_tailoring
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	weight = @tier2weight1
	prerequisites = { "tech_xenomorph_genetic_memory_archives" }

	potential = { xeno_is_xenomorph_hive_country = yes }
}

tech_xenomorph_resin_structural_crucible = {
	icon = tech_gene_crops
	cost = @tier2cost1
	area = engineering
	tier = 2
	category = { industry materials }
	weight = @tier2weight1
	prerequisites = { "tech_xenomorph_chitin_architecture" }

	potential = { xeno_is_xenomorph_hive_country = yes }
}

tech_xenomorph_forced_oviposition = {
	icon = tech_genome_mapping
	cost = @tier1cost2
	area = society
	tier = 1
	category = { biology }
	weight = @tier1weight2
	prerequisites = { "tech_xenomorph_genetic_memory_archives" }

	potential = { xeno_is_xenomorph_hive_country = yes }
}

tech_xenomorph_resin_labor_conditioning = {
	icon = tech_gene_crops
	cost = @tier1cost2
	area = engineering
	tier = 1
	category = { industry materials }
	weight = @tier1weight2
	prerequisites = { "tech_xenomorph_chitin_architecture" }

	potential = { xeno_is_xenomorph_hive_country = yes }
}

tech_xenomorph_host_observation_protocols = {
	icon = tech_genome_mapping
	cost = @tier1cost2
	area = society
	tier = 1
	category = { biology }
	weight = @tier1weight2
	prerequisites = { "tech_xenomorph_genetic_memory_archives" }

	potential = { xeno_is_xenomorph_hive_country = yes }
}

tech_xenomorph_neural_harvesting = {
	icon = tech_genome_mapping
	cost = @tier2cost1
	area = physics
	tier = 2
	category = { field_manipulation particles }
	weight = @tier2weight1
	prerequisites = { "tech_xenomorph_neural_echo_studies" }

	potential = { xeno_is_xenomorph_hive_country = yes }
}

tech_xenomorph_pheromone_conditioning = {
	icon = tech_gene_crops
	cost = @tier2cost1
	area = society
	tier = 2
	category = { statecraft biology }
	weight = @tier2weight1
	prerequisites = { "tech_xenomorph_host_observation_protocols" }

	potential = { xeno_is_xenomorph_hive_country = yes }
}

tech_xenomorph_pleasure_compliance_conditioning = {
	icon = tech_genome_mapping
	cost = @tier2cost2
	area = society
	tier = 2
	category = { statecraft biology }
	is_rare = yes
	weight = @tier2weight2
	prerequisites = { "tech_xenomorph_pheromone_conditioning" }

	potential = { xeno_is_xenomorph_hive_country = yes }
	prereqfor_desc = {
		custom = {
			title = "tech_xenomorph_pleasure_compliance_conditioning_unlock_title"
			desc = "tech_xenomorph_pleasure_compliance_conditioning_unlock_desc"
		}
	}
}

###############################################
# PLACEHOLDER / FUTURE SLAVE RESEARCH TECHNOLOGIES
# These are not assigned to buildings yet. Use them when you finalize the specific research gates.
###############################################

###############################################
# CAPITAL CHAIN TECHS
# Prerequisites for the Xenomorph capital building chain.
###############################################

tech_xenomorph_matriarch_hive = {
	icon = tech_genome_mapping
	cost = @tier3cost1
	area = society
	tier = 3
	category = { statecraft }
	weight = @tier3weight2
	prerequisites = { "tech_galactic_administration" }

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_matriarch_hive_building_title"
			desc = "tech_xenomorph_matriarch_hive_building_desc"
		}
	}

	ai_weight = {
		factor = 4
	}
}

tech_xenomorph_broodmother_hive = {
	icon = tech_gene_tailoring
	cost = @tier4cost1
	area = society
	tier = 4
	category = { biology }
	weight = @tier4weight2
	prerequisites = { "tech_xenomorph_matriarch_hive" "tech_gene_seed_purification" }

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_broodmother_hive_building_title"
			desc = "tech_xenomorph_broodmother_hive_building_desc"
		}
	}

	ai_weight = {
		factor = 4
	}
}

tech_xenomorph_empress_hive = {
	icon = tech_genome_mapping
	cost = @tier4cost1
	area = society
	tier = 4
	category = { statecraft }
	weight = @tier4weight2
	prerequisites = { "tech_xenomorph_matriarch_hive" "tech_galactic_administration" }

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_empress_hive_building_title"
			desc = "tech_xenomorph_empress_hive_building_desc"
		}
	}

	ai_weight = {
		factor = 4
	}
}

tech_xenomorph_war_matriarch_hive = {
	icon = tech_gene_tailoring
	cost = @tier4cost1
	area = engineering
	tier = 4
	category = { voidcraft }
	weight = @tier4weight2
	prerequisites = { "tech_xenomorph_matriarch_hive" "tech_battleships" }

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
		modifier = {
			factor = 2
			has_civic = civic_xenomorph_carapace_ships
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_war_matriarch_hive_building_title"
			desc = "tech_xenomorph_war_matriarch_hive_building_desc"
		}
	}

	ai_weight = {
		factor = 5
	}
}


###############################################
# ROYAL JELLY CHAIN TECHS
###############################################

tech_xenomorph_royal_jelly_pools = {
	icon = tech_gene_crops
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	weight = @tier2weight2
	prerequisites = { "tech_gene_seed_purification" }

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_royal_jelly_pools_building_title"
			desc = "tech_xenomorph_royal_jelly_pools_building_desc"
		}
	}

	ai_weight = {
		factor = 4
	}
}

tech_xenomorph_royal_brood_nexus = {
	icon = tech_gene_tailoring
	cost = @tier3cost1
	area = society
	tier = 3
	category = { biology }
	weight = @tier3weight2
	prerequisites = { "tech_xenomorph_royal_jelly_pools" }

	potential = {
		xeno_is_xenomorph_hive_country = yes
		NOT = { has_origin = origin_xenomorph_queen_mother }
	}

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_royal_brood_nexus_building_title"
			desc = "tech_xenomorph_royal_brood_nexus_building_desc"
		}
	}

	ai_weight = {
		factor = 4
	}
}


###############################################
# AMENITY CHAIN TECHS
###############################################

tech_xenomorph_tunnel_lattice = {
	icon = tech_genome_mapping
	cost = @tier1cost2
	area = engineering
	tier = 1
	category = { industry materials }
	weight = @tier1weight2

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_tunnel_lattice_building_title"
			desc = "tech_xenomorph_tunnel_lattice_building_desc"
		}
	}

	ai_weight = {
		factor = 4
	}
}

tech_xenomorph_hive_resonance_spire = {
	icon = tech_genome_mapping
	cost = @tier3cost1
	area = society
	tier = 3
	category = { biology psionics }
	weight = @tier3weight2
	prerequisites = { "tech_xenomorph_tunnel_lattice" }

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_hive_resonance_spire_building_title"
			desc = "tech_xenomorph_hive_resonance_spire_building_desc"
		}
	}

	ai_weight = {
		factor = 3
	}
}


###############################################
# MANUFACTURING CHAIN TECHS (Carapace Ships civic only)
###############################################

tech_xenomorph_reinforced_carapace_forge = {
	icon = tech_gene_tailoring
	cost = @tier2cost2
	area = engineering
	tier = 2
	category = { materials industry }
	weight = @tier2weight2

	potential = {
		# FIX 2026-07 (Option A): forge chain opened to all Xeno hives;
		# civic_xenomorph_carapace_ships now grants a weaver alloy bonus instead.
		xeno_is_xenomorph_hive_country = yes
	}

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_reinforced_carapace_forge_building_title"
			desc = "tech_xenomorph_reinforced_carapace_forge_building_desc"
		}
	}

	ai_weight = {
		factor = 4
	}
}

tech_xenomorph_living_carapace_foundry = {
	icon = tech_gene_tailoring
	cost = @tier3cost2
	area = engineering
	tier = 3
	category = { materials industry }
	weight = @tier3weight2
	prerequisites = { "tech_xenomorph_reinforced_carapace_forge" }

	potential = {
		# FIX 2026-07 (Option A): forge chain opened to all Xeno hives;
		# civic_xenomorph_carapace_ships now grants a weaver alloy bonus instead.
		xeno_is_xenomorph_hive_country = yes
	}

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_living_carapace_foundry_building_title"
			desc = "tech_xenomorph_living_carapace_foundry_building_desc"
		}
	}

	ai_weight = {
		factor = 4
	}
}


###############################################
# UNITY CHAIN TECHS — Pheromone tier and Tribute system
###############################################

tech_xenomorph_pheromone_chorus_chamber = {
	icon = tech_gene_crops
	cost = @tier2cost1
	area = society
	tier = 2
	category = { statecraft }
	weight = @tier2weight2

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_pheromone_chorus_chamber_building_title"
			desc = "tech_xenomorph_pheromone_chorus_chamber_building_desc"
		}
	}

	ai_weight = {
		factor = 4
	}
}

tech_xenomorph_hive_devotion_nexus = {
	icon = tech_genome_mapping
	cost = @tier3cost1
	area = society
	tier = 3
	category = { statecraft psionics }
	weight = @tier3weight2
	prerequisites = { "tech_xenomorph_pheromone_chorus_chamber" }

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_hive_devotion_nexus_building_title"
			desc = "tech_xenomorph_hive_devotion_nexus_building_desc"
		}
	}

	ai_weight = {
		factor = 3
	}
}

tech_xenomorph_royal_tribute_warren = {
	icon = tech_genome_mapping
	cost = @tier2cost2
	area = society
	tier = 2
	category = { statecraft }
	weight = @tier2weight2

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_royal_tribute_warren_building_title"
			desc = "tech_xenomorph_royal_tribute_warren_building_desc"
		}
	}

	ai_weight = {
		factor = 3
	}
}

tech_xenomorph_royal_pens = {
	icon = tech_neural_implants
	cost = @tier3cost2
	area = society
	tier = 3
	category = { statecraft }
	weight = @tier3weight2
	prerequisites = { "tech_xenomorph_royal_tribute_warren" }

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_royal_pens_building_title"
			desc = "tech_xenomorph_royal_pens_building_desc"
		}
	}

	ai_weight = {
		factor = 3
	}
}


###############################################
# DEFENSE CHAIN TECHS
###############################################

tech_xenomorph_warriors_nest = {
	icon = tech_gene_tailoring
	cost = @tier1cost2
	area = society
	tier = 1
	category = { military_theory }
	weight = @tier1weight2

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_warriors_nest_building_title"
			desc = "tech_xenomorph_warriors_nest_building_desc"
		}
	}

	ai_weight = {
		factor = 4
	}
}

tech_xenomorph_sentrys_nest = {
	icon = tech_genome_mapping
	cost = @tier2cost1
	area = society
	tier = 2
	category = { military_theory }
	weight = @tier2weight2
	prerequisites = { "tech_xenomorph_warriors_nest" }

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_sentrys_nest_building_title"
			desc = "tech_xenomorph_sentrys_nest_building_desc"
		}
	}

	ai_weight = {
		factor = 4
	}
}


###############################################
# PRAETORIAN CHAIN TECHS
# T4 Praetorian Command Warren uses an ascension perk flag instead of a tech.
###############################################


# Voidbrood adaptation tech. Granted by the Voidbrood discovery event.
# The study already sets the unlocked flag; this tech can be used to unlock traits, armies, buildings, or decisions.
tech_xenomorph_voidbrood_adaptation = {
	icon = tech_gene_tailoring
	cost = @tier3cost2
	area = society
	tier = 3
	category = { biology }
	is_rare = yes
	weight = 0
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = { modifier = { factor = 100 has_country_flag = xeno_voidbrood_hostline_tech_available } }
}

# Draconic adaptation tech. Granted by the Draconic discovery event.
tech_xenomorph_draconic_adaptation = {
	icon = tech_genome_mapping
	cost = @tier4cost1
	area = society
	tier = 4
	category = { biology }
	is_rare = yes
	weight = 0
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = { modifier = { factor = 100 has_country_flag = xeno_draconic_hostline_tech_available } }
}

# === Pass 18: 4 new research building tech-gates ===

# T2 Physics — Bioelectric Resonance Cathedral
tech_xenomorph_bioelectric_cathedral = {
	icon = tech_genome_mapping
	cost = @tier3cost1
	area = physics
	tier = 3
	category = { computing }
	prerequisites = { tech_xenomorph_bioelectric_resonance }
	is_rare = no
	weight = @tier3weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
}

# T3 Society — Apex Genetic Codex
tech_xenomorph_apex_genetic_codex = {
	icon = tech_gene_tailoring
	cost = @tier4cost1
	area = society
	tier = 4
	category = { biology }
	prerequisites = { tech_xenomorph_hostline_gene_archive }
	is_rare = yes
	weight = @tier4weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
}

# T3 Engineering — Apex Resin Forge
tech_xenomorph_apex_resin_forge = {
	icon = tech_gene_crops
	cost = @tier4cost1
	area = engineering
	tier = 4
	category = { materials }
	prerequisites = { tech_xenomorph_resin_structural_crucible }
	is_rare = yes
	weight = @tier4weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
}

# T3 Physics — Apex Bioelectric Singularity
tech_xenomorph_apex_bioelectric_singularity = {
	icon = tech_genome_mapping
	cost = @tier4cost1
	area = physics
	tier = 4
	category = { computing }
	prerequisites = { tech_xenomorph_bioelectric_cathedral }
	is_rare = yes
	weight = @tier4weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
}

# === Pass 19: 6 new resource building tech-gates ===

# T2 Egg — Ovomorph Chamber (civic-gated)
tech_xenomorph_ovomorph_chamber = {
	icon = tech_genome_mapping
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	is_rare = no
	weight = @tier2weight1
	# CIVIC PATH: cheaper cost (~75% of tier2cost1) as reward for the civic commitment.
	potential = {
		xeno_is_xenomorph_hive_country = yes
	}
}

# T3 Egg — Royal Brood Vault (civic-gated)
tech_xenomorph_royal_brood_vault = {
	icon = tech_gene_tailoring
	cost = @tier3cost1
	area = society
	tier = 3
	category = { biology }
	prerequisites = { tech_xenomorph_ovomorph_chamber }
	is_rare = no
	weight = @tier3weight1
	# CIVIC PATH: cheaper cost (~75% of tier3cost2) as reward for the civic commitment.
	potential = {
		xeno_is_xenomorph_hive_country = yes
	}
}





# === Pass 20: Egg/Offspring economy unlock techs ===
# These are the research-path entry points. Civic players (with
# the economy from game start. Research-path players must:
#   1) Be a Xenomorph empire
#   2) Have enslaved or conquered a non-Xenomorph species
# Then these techs become available, and grant access to the egg/offspring
# chains at normal (un-discounted) cost.

# UNLOCK TECH: Egg Economy
# UNLOCK TECH: Offspring Economy
# === Pass 20: Research-path parallel egg chain techs (normal cost) ===
# Required by research-path egg buildings as alternate to the civic-path techs.

# RESEARCH PATH: T2 Egg Chain - normal cost (research player pays full retail)
# RESEARCH PATH: T3 Egg Chain - normal cost
# === Pass 20: Slave/Host chain techs ===

# === OFFSPRING CHAIN — civic + research parallel pattern ===

# Civic-path T2 (cheaper)
tech_xenomorph_broodmare_pens = {
	icon = tech_gene_tailoring
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	is_rare = no
	weight = @tier2weight1
	potential = {
		xeno_is_xenomorph_hive_country = yes
	}
}

# Research-path T2 (normal cost)
# Civic-path T3 (cheaper)
tech_xenomorph_royal_broodstock_hive = {
	icon = tech_gene_tailoring
	cost = @tier3cost1
	area = society
	tier = 3
	category = { biology }
	prerequisites = { tech_xenomorph_broodmare_pens }
	is_rare = no
	weight = @tier3weight1
	potential = {
		xeno_is_xenomorph_hive_country = yes
	}
}

# Research-path T3 (normal cost)
# === HOST IMPLANTATION CHAIN — single path, no civic split ===

tech_xenomorph_breeding_pit = {
	icon = tech_gene_tailoring
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	is_rare = no
	weight = @tier2weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
}

tech_xenomorph_apex_breeding_hive = {
	icon = tech_gene_tailoring
	cost = @tier3cost2
	area = society
	tier = 3
	category = { biology }
	prerequisites = { tech_xenomorph_breeding_pit }
	is_rare = no
	weight = @tier3weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
}

# === SLAVE RESEARCH CHAIN — single path, T1 already has tech_xenomorph_host_observation_protocols (existing) ===

# T2 prereq already exists: tech_xenomorph_neural_harvesting

tech_xenomorph_apex_specimen_vault = {
	icon = tech_genome_mapping
	cost = @tier3cost2
	area = society
	tier = 3
	category = { biology }
	prerequisites = { tech_xenomorph_neural_harvesting }
	is_rare = no
	weight = @tier3weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
}

# === SLAVE INDUSTRY CHAIN ===

tech_xenomorph_refined_resin_smelter = {
	icon = tech_gene_crops
	cost = @tier2cost1
	area = engineering
	tier = 2
	category = { industry }
	prerequisites = { tech_xenomorph_resin_labor_conditioning }
	is_rare = no
	weight = @tier2weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
}

tech_xenomorph_apex_resin_industrial_forge = {
	icon = tech_gene_crops
	cost = @tier3cost2
	area = engineering
	tier = 3
	category = { industry }
	prerequisites = { tech_xenomorph_refined_resin_smelter }
	is_rare = no
	weight = @tier3weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
}

# Pass 21: WARRIOR CASTE — generic Xeno warrior brood army unlock
# Available to all Xenomorph empires; not subspecies-gated.
tech_xeno_warrior_caste = {
	icon = tech_gene_tailoring
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	ai_update_type = all
	weight = 75

	potential = {
		any_owned_species = {
			has_trait = trait_xenomorph
		}
	}

	weight_modifier = {
		modifier = {
			factor = 1.5
			any_owned_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		army = {
			title = "tech_xeno_warrior_caste_army_title"
			desc = "tech_xeno_warrior_caste_army_desc"
		}
	}
}

# === Pass 28: Host absorption techs (one per species class) ===
# Gated to Xenomorph empires. Tier 2 society/biology techs.
# Unlocks pop traits that allow this species class to be absorbed as Xeno hosts.

tech_xenomorph_aquatic_host_absorption = {
	icon = tech_genome_mapping
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	is_rare = no
	weight = @tier2weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { is_species_class = AQUATIC }
		}
	}
}

tech_xenomorph_arthropoid_host_absorption = {
	icon = tech_genome_mapping
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	is_rare = no
	weight = @tier2weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { is_species_class = ARTHROPOID }
		}
	}
}

tech_xenomorph_avian_host_absorption = {
	icon = tech_genome_mapping
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	is_rare = no
	weight = @tier2weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { is_species_class = AVIAN }
		}
	}
}

tech_xenomorph_cybernetic_host_absorption = {
	icon = tech_genome_mapping
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = @tier2weight2
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { is_species_class = CYBERNETIC }
		}
	}
}

tech_xenomorph_lithoid_host_absorption = {
	icon = tech_genome_mapping
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = @tier2weight2
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { is_species_class = LITHOID }
		}
	}
}

tech_xenomorph_mammalian_host_absorption = {
	icon = tech_genome_mapping
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	is_rare = no
	weight = @tier2weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { is_species_class = MAMMALIAN }
		}
	}
}

tech_xenomorph_molluscoid_host_absorption = {
	icon = tech_genome_mapping
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	is_rare = no
	weight = @tier2weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { is_species_class = MOLLUSCOID }
		}
	}
}

tech_xenomorph_necroid_host_absorption = {
	icon = tech_genome_mapping
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = @tier2weight2
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { is_species_class = NECROID }
		}
	}
}

tech_xenomorph_psionic_host_absorption = {
	icon = tech_psionic_theory
	cost = @tier2cost2
	area = society
	tier = 2
	category = { biology }
	is_rare = yes
	weight = @tier2weight2
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { is_species_class = PSIONIC }
		}
	}
}

tech_xenomorph_reptilian_host_absorption = {
	icon = tech_genome_mapping
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	is_rare = no
	weight = @tier2weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
	weight_modifier = {
		modifier = {
			factor = 2
			any_owned_species = { is_species_class = REPTILIAN }
		}
	}
}

# === Pass 28: Espionage operation techs (chained for op unlocks) ===
tech_xenomorph_op_brood_swap = {
	icon = tech_gene_tailoring
	cost = @tier3cost1
	area = society
	tier = 3
	category = { biology }
	is_rare = no
	weight = @tier3weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
}

tech_xenomorph_op_implantation = {
	icon = tech_genome_mapping
	cost = @tier3cost2
	area = society
	tier = 3
	category = { biology }
	prerequisites = { tech_xenomorph_op_brood_swap }
	is_rare = no
	weight = @tier3weight2
	potential = { xeno_is_xenomorph_hive_country = yes }
}

tech_xenomorph_op_brood_uprising = {
	icon = tech_gene_tailoring
	cost = @tier4cost1
	area = society
	tier = 4
	category = { biology }
	prerequisites = { tech_xenomorph_op_implantation }
	is_rare = no
	weight = @tier4weight1
	potential = { xeno_is_xenomorph_hive_country = yes }
}

tech_xenomorph_op_planetary_consumption = {
	icon = tech_genome_mapping
	cost = @tier4cost2
	area = society
	tier = 4
	category = { biology }
	prerequisites = { tech_xenomorph_op_brood_uprising }
	is_rare = yes
	weight = @tier4weight2
	potential = { xeno_is_xenomorph_hive_country = yes }
}


# === Buildings gated by research (live-test pass) ===
tech_xenomorph_tribute_pens = {
	icon = tech_neural_implants
	cost = @tier1cost2
	area = society
	tier = 1
	category = { statecraft }
	weight = @tier1weight2
	potential = { any_owned_pop_group = { is_xenomorph = yes } }
	prereqfor_desc = {
		custom = {
			title = "tech_xenomorph_tribute_pens_building_title"
			desc = "tech_xenomorph_tribute_pens_building_desc"
		}
	}
}

tech_xenomorph_drones_nest = {
	icon = tech_genome_mapping
	cost = @tier1cost2
	area = engineering
	tier = 1
	category = { military_theory }
	weight = @tier1weight2
	potential = { any_owned_pop_group = { is_xenomorph = yes } }
	prereqfor_desc = {
		custom = {
			title = "tech_xenomorph_drones_nest_building_title"
			desc = "tech_xenomorph_drones_nest_building_desc"
		}
	}
}

tech_xenomorph_self_seeding_brood_hive = {
	icon = tech_gene_tailoring
	cost = @tier1cost2
	area = society
	tier = 1
	category = { biology }
	weight = @tier1weight2

	potential = { xeno_is_xenomorph_hive_country = yes }

	weight_modifier = {
		modifier = {
			factor = 2
			owner_main_species = { has_trait = trait_xenomorph }
		}
	}

	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_self_seeding_brood_hive_building_title"
			desc = "tech_xenomorph_self_seeding_brood_hive_building_desc"
		}
	}

	ai_weight = {
		factor = 4
	}
}

# UNLOCK TECH: Oviposition Chamber - researchable only after the hive has enslaved or conquered a non-Xenomorph species (modeled on the slave-processing tech gate).
tech_xenomorph_oviposition_chamber = {
	icon = tech_genome_mapping
	cost = @tier2cost1
	area = society
	tier = 2
	category = { biology }
	is_rare = no
	weight = @tier2weight2
	potential = {
		xeno_is_xenomorph_hive_country = yes
		xeno_has_enslaved_or_conquered_species = yes
	}
	prereqfor_desc = {
		building = {
			title = "tech_xenomorph_oviposition_chamber_building_title"
			desc = "tech_xenomorph_oviposition_chamber_building_desc"
		}
	}
	ai_weight = { factor = 4 }
}
